package com.fram.service.api.v1.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fram.bean.api.keyword.KeywordResponse;
import com.fram.common.canstant.ErrCode;
import com.fram.common.exception.ProException;
import com.fram.common.exception.ProValiDataException;
import com.fram.entity.Keyword;
import com.fram.mapper.KeywordMapper;
import com.fram.service.api.v1.KeywordService;
@Service
public class KeywordServiceImpl implements KeywordService{
	@Autowired
	private  KeywordMapper keywordMapper;

	@Override
	public KeywordResponse answerList(Keyword record)throws ProException {
		KeywordResponse request = keywordMapper.listForApi(record);
		 if(request==null) {
				throw new ProValiDataException(ErrCode.NO_DATA.getReturnCode(), ErrCode.NO_DATA.getReturnMsg());
		 }
		return request;
	}
}
